<div id="menucontainer">
    <div id="menunav">
        <ul>
            <?php
            $array = $_SESSION['Permisos'];
            $actual =  $_SERVER['PHP_SELF'];
            $actual = split("/", $actual);
            
            foreach ($array as $m) {
                $tempUrl = $m[ds] . ".php";
                if ($tempUrl == $actual[2]) {
                    echo "<li><a href=\"" . $m[ds] . ".php\"" . " class='current'><span>" . _($m[ds]) . "</span></a></li>";
                } else {
                    echo "<li><a href=\"" .$m[ds]. ".php\"" . " ><span>" . _($m[ds]) . "</span></a></li>";
                }
                
                
            }
            ?>
        </ul>
    </div>
</div>